  <div class="fly-panel fly-column"> 
   <div class="layui-container"> 
    <ul class="layui-clear"> 
     <li class="layui-hide-xs {:input('')?'':'layui-this'}"><a href="/">首页</a></li>
     {volist name="cates" id="cate"} 
     <li class="{:input('cate_id')==$cate.cate_id ?'layui-this':''}"> <a href="{:url('index/index/index',['cate_id'=>$cate['cate_id']])}"> {$cate.cate_name} </a> </li>
     {/volist}
     <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li> 
     <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user/post/">我发表的贴</a></li> 
     <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="/user/post/#collection">我收藏的贴</a></li> 
    </ul> 
    <div class="fly-column-right layui-hide-xs"> 
     <span class="fly-search LAY_search"><i class="layui-icon"></i></span> 
     <a href="{:url('index/jie/add')}" class="layui-btn">发表新帖</a> 
    </div> 
    <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;"> 
     <a href="{:url('index/jie/add')}" class="layui-btn">发表新帖</a> 
    </div> 
   </div>
  </div>
<div class="layui-container"> 
   <div class="layui-row layui-col-space15"> 
    <div class="layui-col-md8"> 
    {if condition="!input('')"}
     <div class="fly-panel"> 
          <div class="fly-panel-title fly-filter"> 
           <a>置顶</a> 
           <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a> 
          </div> 
          <ul class="fly-list">
            {volist name="topData" id="item"}
           <li>
            <a href="/u/168" class="fly-avatar"> <img src="__ROOT__/{$item.face}" alt="贤心" /> </a> <h2> <a class="layui-badge">{$item.cate_name}</a> <a href="{:url('index/jie/index',['id'=>$item['question_id']])}">{$item.title}</a> </h2> 
            <div class="fly-list-info"> 
             <a href="/u/168" link=""> <cite>{$item.nickname}</cite> <i class="iconfont icon-renzheng" title="认证信息：layui 作者"></i> </a> 
             <span>{:Ftime($item.create_time)}</span> 
             <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> {$item.kiss}</span> 
             <span class="fly-list-nums"> <i class="iconfont icon-pinglun1" title="回答"></i> {$item.reply_num} </span> 
            </div> 
            <div class="fly-list-badge"> 
            </div>
            </li>
            {/volist}
          </ul> 
     </div>
     {/if}
     <div class="fly-panel" style="margin-bottom: 0;"> 
      <div class="fly-panel-title fly-filter">
       <a href="{:url('index/index/index',['type'=>0,'cate_id'=>input('cate_id')])}" class="{:input('type')==0?'layui-this':''}">综合</a>
       <span class="fly-mid"></span>
       <a href="{:url('index/index/index',['type'=>1,'cate_id'=>input('cate_id')])}" class="{:input('type')==1?'layui-this':''}">未结</a>
       <span class="fly-mid"></span>
       <a href="{:url('index/index/index',['type'=>2,'cate_id'=>input('cate_id')])}" class="{:input('type')==2?'layui-this':''}">已结</a>
       <span class="fly-mid"></span>
       <a href="{:url('index/index/index',['type'=>3,'cate_id'=>input('cate_id')])}" class="{:input('type')==3?'layui-this':''}">精华</a>
      </div> 
      <ul class="fly-list"> 
        {volist name="allData" id="item"}
           <li>
            <a href="/u/168" class="fly-avatar"> <img src="__ROOT__/{$item.face}" alt="贤心" /> </a> <h2> <a class="layui-badge">{$item.cate_name}</a> <a href="{:url('index/jie/index',['id'=>$item['question_id']])}">{$item.title}</a> </h2> 
            <div class="fly-list-info"> 
             <a href="/u/168" link=""> <cite>{$item.nickname}</cite> <i class="iconfont icon-renzheng" title="认证信息：layui 作者"></i> </a> 
             <span>{:Ftime($item.create_time)}</span> 
             <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> {$item.kiss}</span>

             {if condition="$item.status=='1'"}
                <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
             {/if} 
             <span class="fly-list-nums"> <i class="iconfont icon-pinglun1" title="回答"></i> {$item.reply_num} </span> 
            </div> 
            <div class="fly-list-badge"> 
                {if condition="$item.is_top=='1'"}
                <span class="layui-badge layui-bg-black">置顶</span>
                {/if}
                {if condition="$item.is_good=='1'"}
                <span class="layui-badge layui-bg-red">精帖</span>
                {/if}
            </div>
            </li>
            {/volist}
      </ul> 
      <div style="text-align: center">
        <style>
            .page{
                margin-top: 20px;
                text-align: center;

            }
            .page a{
                display: inline-block;
                background: #fff url() 0 0 no-repeat;
                color: #888;
                padding: 10px;
                min-width: 15px;
                border: 1px solid #E2E2E2;

            }
            .page span{
                display: inline-block;
                padding: 10px;
                min-width: 15px;
                border: 1px solid #E2E2E2;
            }
            .page span.current{
                display: inline-block;
                background: #009688 url() 0 0 no-repeat;
                color: #fff;
                padding: 10px;
                min-width: 15px;
                border: 1px solid #009688;
            }
            .page .pagination li{
                display: inline-block;
                margin-right: 5px;
                text-align: center;
            }
            .page .pagination li.active span{
                background: #009688 url() 0 0 no-repeat;
                color: #fff;
                border: 1px solid #009688;

            }
        </style> 
        <div class="page">
            {$allData->render()}
        </div>
      </div> 
     </div> 
    </div> 
    <div class="layui-col-md4"> 
     <div class="fly-panel"> 
      <h3 class="fly-panel-title">温馨通道</h3> 
      <div class="layui-row fly-panel-main" style="padding: 15px;"> 
       <div class="layui-clear fly-list-quick"> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="https://fly.layui.com/extend" target="_blank"> 组件平台 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/case/2018/" target="_blank"> 年度案例 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/jie/30227/" target="_blank"> 精贴集锦 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/jie/4281/" target="_blank"> Git 仓库 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://fly.layui.com/jie/13435/" target="_blank"> 关于飞吻 </a> 
         </div> 
        </div> 
        <div class="layui-col-xs6"> 
         <div> 
          <a href="http://www.layui.com/template/fly/" target="_blank"> Fly 社区模板 </a> 
         </div> 
        </div> 
        <a name="signin"> </a> 
       </div> 
      </div>
     </div> 
     <div class="fly-panel fly-signin"> 
      <div class="fly-panel-title">
        签到 
       <i class="fly-mid"></i> 
       <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a> 
       <i class="fly-mid"></i> 
       <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span class="layui-badge-dot"></span></a> 

      {if condition="$sign.is_login"}
       <span class="fly-signin-days">已连续签到<cite>{$sign.sign_num}</cite>天</span> 
      {/if}
      </div> 
      <div class="fly-panel-main fly-signin-main">

        {if condition="isset($sign.is_sign)  && $sign.is_sign"}
          <button class="layui-btn layui-btn-disabled">今日已签到</button>
       
        {else/}
          <button class="layui-btn layui-btn-danger" id="signin">今日签到</button>
        {/if}

        {if condition="$sign.is_login"}
          <span>可获得<cite>{$sign.kiss}</cite>飞吻</span>
        {/if}
      </div>
     </div> 
     <div class="fly-panel"> 
      <div class="fly-panel-title">
        钻级赞助商 
       <span class="fly-mid"></span> 
       <a href="/jie/15697/" class="fly-link fly-joinad    ">我要加入</a> 
      </div> 
      <div class="fly-panel-main" style="padding: 13px 15px;"> 
       <a href="https://www.larryms.com/cates/5.html" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: #64BF98;" time-limit="2018-11-06 0:0:0"> 60秒极速上手，layui案例排名NO1后台框架 </a> 
       <a href="https://yunzhuji.shop/url/?t=s11t&amp;utm_source=fly" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color: #FF0000;" time-limit="2018-11-05 0:0:0"> 阿里云双11拼团低至99元，瓜分百万红包 </a> 
      </div>
     </div> 
     <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank"> 
      <h3 class="fly-panel-title">回贴周榜</h3> 
      <dl>
        {volist name="weekHot" id="item"}
       <dd>
        <a href="{:url('index/user/home',['uid'=>$item['user_id']])}"><img src="__ROOT__/{$item.face}" /><cite>{$item.nickname}</cite><i>{$item.num}次回答</i></a>
       </dd>
       {/volist}
      </dl> 
     </div> 
     {include file="hot" /}
     <div class="fly-panel"> 
      <div class="fly-panel-title">
        官方产品 
      </div> 
      <div class="fly-panel-main"> 
       <a href="http://www.layui.com/admin/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #20222A; background-image: linear-gradient(to right,#20222A,#3E4251);">layuiAdmin - layui 官方后台管理模板</a> 
       <a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu" time-limit="2017.09.25-2099.01.01" style="background-color: #009688; background-image: linear-gradient(to right,#009688,#5FB878);">LayIM - layui 即时通讯旗舰之作</a> 
      </div>
     </div> 
     <div class="fly-panel" style="padding: 20px 0; text-align: center;"> 
      <img src="//cdn.layui.com/upload/2017_8/168_1501894831075_19619.jpg" style="max-width: 100%;" alt="layui" /> 
      <p style="position: relative; color: #666;">微信扫码关注 layui 公众号</p> 
     </div> 
     <div class="fly-panel fly-link"> 
      <h3 class="fly-panel-title">友情链接</h3> 
      <dl class="fly-panel-main"> 
       <dd>
        <a href="http://layim.layui.com/" target="_blank">WebIM</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://layer.layui.com/" target="_blank">layer</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.layui.com/laydate/" target="_blank">layDate</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.bejson.com/" target="_blank">JSON在线工具</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.smeoa.com/" target="_blank">小微OA</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.fineui.com/" target="_blank">FineUI开源控件</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="https://www.hellojava.com/" target="_blank">Java菜鸟社区</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="https://juejin.im?from=layui" target="_blank">掘金开发者社区</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.jianliben.com/" target="_blank">简历模板</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="http://www.uileader.com/" target="_blank">TouchUI移动框架</a>
       </dd>
       <dd> 
       </dd>
       <dd>
        <a href="javascript:;" onclick="layer.alert('发送邮件至：xianxin@layui-inc.com&lt;br&gt; 邮件标题为：申请Fly社区友链', {title:'申请友链'});" class="fly-link">申请友链</a>
       </dd>
       <dd> 
       </dd>
      </dl> 
     </div> 
    </div> 
   </div>
  </div>

  <script>

      layui.use(['layer'],function () {

        layer = layui.layer;

        $('#signin').click(function(event) {
            $.get('{:url('index/user/sign')}', function(data) {
              if(data.code==0){
                layer.msg(data.msg,function(){});
              }else{
                layer.alert(data.msg,{icon:6},function(){
                  location.reload();
                })
              }
            });
        });

      })
  </script>